<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>Form Elements - Ace Admin</title>

<meta name="description" content="Common form elements and layouts" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<!-- bootstrap & fontawesome -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/font-awesome.min.css" />

<!-- page specific plugin styles -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/jquery-ui.custom.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/chosen.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-timepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/daterangepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/bootstrap-colorpicker.min.css" />


<!-- ace styles -->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace.min.css"
	id="main-ace-style" />

<!--[if lte IE 9]>
			<link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace-part2.min.css" />
		<![endif]-->
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace-skins.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/ace/assets/css/ace-rtl.min.css" />

<!--[if lte IE 9]>
		  <link rel="stylesheet" href="<%=request.getContextPath()%>/ace/assets/css/ace-ie.min.css" />
		<![endif]-->

<!-- inline styles related to this page -->

<!-- ace settings handler -->
<script
	src="<%=request.getContextPath()%>/ace/assets/js/ace-extra.min.js"></script>

<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

<!--[if lte IE 8]>
		<script src="<%=request.getContextPath()%>/ace/assets/js/html5shiv.min.js"></script>
		<script src="<%=request.getContextPath()%>/ace/assets/js/respond.min.js"></script>
		<![endif]-->
		
<link href="<%=request.getContextPath()%>/static/richeditor/external/google-code-prettify/prettify.css" rel="stylesheet" />
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet" />
<link href="<%=request.getContextPath()%>/static/richeditor/css/style.css" rel="stylesheet" />
</head>

<body class="no-skin">
	

	<!-- /section:basics/content.breadcrumbs -->
	<div class="page-content">
		<!-- /section:settings.box -->
		<div class="page-content-area">
			<div class="page-header">
				<h1>
					政策问答编辑 
				</h1>
			</div>
			<!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					<form id="drizzt-table" class="form-horizontal"
						action="<%=request.getContextPath()%>/bsbPolicyQa/update.do"
						method="post">
						<!-- #section:elements.form -->
								<input type="hidden" id="form-field-1" name="uuid" value="${bsbPolicyQa.uuid}"
									class="col-xs-10 col-sm-5" />
								<div class="form-group">
									<label class="col-sm-1 control-label no-padding-right"
										for="form-field-1"> 标题 </label>
		
									<div class="col-sm-11">
										<input type="text" id="form-field-1" placeholder="title"
											name="title" value="${bsbPolicyQa.title}"
											class="col-xs-10 col-sm-5" />
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-1 control-label no-padding-right"
										for="form-field-1"> 内容 </label>
		
									<input type="hidden" name="content" id="content">
							<div class="col-sm-12">
									<div class="btn-toolbar col-sm-12" data-role="editor-toolbar"	data-target="#editor" id="toolbar">
									<div class="btn-group">
										<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Font Size"><i class="fa fa-text-height"></i>&nbsp;<b class="caret"></b></a>
										<ul class="dropdown-menu">
											<li><a data-edit="fontSize 5" class="fs-Five">Huge</a></li>
											<li><a data-edit="fontSize 3" class="fs-Three">Normal</a></li>
											<li><a data-edit="fontSize 1" class="fs-One">Small</a></li>
										</ul>
									</div>
									<div class="btn-group">
										<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Text Highlight Color"><i class="fa fa-paint-brush"></i>&nbsp;<b class="caret"></b></a>
										<ul class="dropdown-menu">
											<p>&nbsp;&nbsp;&nbsp;Text Highlight Color:</p>
					                        <li><a data-edit="backColor #00FFFF">Blue</a></li>
											<li><a data-edit="backColor #00FF00">Green</a></li>
											<li><a data-edit="backColor #FF7F00">Orange</a></li>
											<li><a data-edit="backColor #FF0000">Red</a></li>
											<li><a data-edit="backColor #FFFF00">Yellow</a></li>
										</ul>
									</div>
									<div class="btn-group">
										<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Font Color"><i class="fa fa-font"></i>&nbsp;<b class="caret"></b></a>
										<ul class="dropdown-menu">
											<p>&nbsp;&nbsp;&nbsp;Font Color:</p>
											<li><a data-edit="foreColor #000000">Black</a></li>
					                        <li><a data-edit="foreColor #0000FF">Blue</a></li>
					                        <li><a data-edit="foreColor #30AD23">Green</a></li>
											<li><a data-edit="foreColor #FF7F00">Orange</a></li>
											<li><a data-edit="foreColor #FF0000">Red</a></li>
											<li><a data-edit="foreColor #FFFF00">Yellow</a></li>
										</ul>
									</div>
									<div class="btn-group">
										<a class="btn btn-default" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i class="fa fa-bold"></i></a>
										<a class="btn btn-default" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i class="fa fa-italic"></i></a>
										<a class="btn btn-default" data-edit="strikethrough" title="Strikethrough"><i class="fa fa-strikethrough"></i></a>
										<a class="btn btn-default" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i class="fa fa-underline"></i></a>
									</div>
									<div class="btn-group">
										<a class="btn btn-default" data-edit="insertunorderedlist" title="Bullet list"><i class="fa fa-list-ul"></i></a>
										<a class="btn btn-default" data-edit="insertorderedlist" title="Number list"><i class="fa fa-list-ol"></i></a>
										<a class="btn btn-default" data-edit="outdent" title="Reduce indent (Shift+Tab)"><i class="fa fa-outdent"></i></a>
										<a class="btn btn-default" data-edit="indent" title="Indent (Tab)"><i class="fa fa-indent"></i></a>
									</div>
									<div class="btn-group">
										<a class="btn btn-default" data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)"><i class="fa fa-align-left"></i></a>
										<a class="btn btn-default" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"><i class="fa fa-align-center"></i></a>
										<a class="btn btn-default" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"><i class="fa fa-align-right"></i></a>
										<a class="btn btn-default" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"><i class="fa fa-align-justify"></i></a>
									</div>
									<div class="btn-group">
										<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i class="fa fa-link"></i></a>
										<div class="dropdown-menu input-append">
											<input placeholder="URL" type="text" data-edit="createLink" />
											<button class="btn" type="button">Add</button>
										</div>
									</div>
									<div class="btn-group">
										<a class="btn btn-default" data-edit="unlink" title="Remove Hyperlink"><i class="fa fa-unlink"></i></a>
										<span class="btn btn-default" title="Insert picture (or just drag & drop)" id="pictureBtn"> <i class="fa fa-picture-o"></i>
											<input class="imgUpload" type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage" />
										</span>
									</div>
									<div class="btn-group">
										<a class="btn btn-default" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i class="fa fa-undo"></i></a>
										<a class="btn btn-default" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i class="fa fa-repeat"></i></a>
										<!-- <a class="btn btn-default" data-edit="html" title="Clear Formatting"><i class='glyphicon glyphicon-pencil'></i></a> -->
									</div>
								</div>
								<div id="editor" class="lead" data-placeholder="此处输入内容."></div>
								</div>
								
								
								
								
						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<input  class="btn btn-info" type="button" onclick="create();" value="提交" />

								&nbsp; &nbsp; &nbsp;
								<input  class="btn btn-info" type="button" onclick="history.go(-1)" value="返回" />
							</div>
						</div>
					</form>

					<!-- PAGE CONTENT ENDS -->
				</div>
				<!-- /.col -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /.page-content-area -->
	</div>
	<!-- /.page-content -->
</body>

<!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
	window.jQuery
			|| document
					.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery.min.js'>"
							+ "<"+"/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery1x.min.js'>"+"<"+"/script>");
</script>
<![endif]-->
<script type="text/javascript">
	if ('ontouchstart' in document.documentElement)
		document.write("<script src='<%=request.getContextPath()%>/ace/assets/js/jquery.mobile.custom.min.js'>"+ "<"+"/script>");
</script>

<script
	src="<%=request.getContextPath()%>/ace/assets/js/bootstrap.min.js"></script>

<script src="<%=request.getContextPath()%>/static/richeditor/external/jquery.hotkeys.js"></script>
<script src="<%=request.getContextPath()%>/static/richeditor/external/google-code-prettify/prettify.js"></script>
<script src="<%=request.getContextPath()%>/static/richeditor/js/bootstrap-wysiwyg.js"></script>
<script type='text/javascript'>
	$('#editor').wysiwyg({ toolbarSelector: "#toolbar" });
	$('#editor').html('${bsbPolicyQa.content}');
</script>
<script type="text/javascript">
function create(){
	$("#content").val($('#editor').html());
	$("#drizzt-table").submit();
}
</script>
</html>
